
<div class="col-sm-12">
	<div class="box margin-middle max-width">
		<!-- BOX-BODY -->
		<div class="box-body">
			<div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
			<div class="row">
				<!-- 列表详细介绍 -->
				<!-- <div class="col-xs-12 nopadding-left">
					<div class="col-xs-12 nopadding-horizontal mt20">
            {{#each confList as |conf|}}
						<div class="col-xs-12 col-sm-6 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon">{{conf.name}}({{conf.unit}})：</span>
								{{#if conf.choosed}}
									{{input type="text" class="full-width inline-block form-input-group label-normal form-control" value=conf.value focusOut=(action "saveConf" conf)}}
								{{else}}
									<div class="input-group-content pointer" {{action 'chooseConf' conf on="click"}}>{{conf.value}}</div>
								{{/if}}
							</div>
							<div class="divide-10"></div>
						</div>
            {{/each}}
						</div>
					</div> -->
					<div class="col-xs-9">
						{{#if drugConf}}
						<p class="font14 line-height-30">
							您可以手动修改药品提醒天数，当前药品提醒天数为
							{{#if drugConf.choosed}}
							{{input type="text" class="inline-block form-input-group label-normal form-control width32 padding-3-5" value=drugConf.value focusOut=(action "saveConf" drugConf)}}
							{{else}}
							<span class="input-group-content" {{action 'chooseConf' drugConf on="click"}}>{{drugConf.value}}</span>
							{{/if}}
							天(
							<span class="input-group-content pointer color4395FF" {{action 'modifyConf' drugConf on="click"}}>修改</span>
							)
						</p>
						{{/if}}
					</div>
					<div class="user-add-btn col-sm-3 nopadding-right">
            {{#ui/mix-button class="user-btn pull-right" iconClass="fa-plus"  text='生成统计单'  clickAction="toCreateRecord" toCreateRecord="toCreateRecord"}}
            {{/ui/mix-button}}
          </div>
				</div>
				<table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable" aria-describedby="datatable1_info">
          <thead>
            <tr role="row">
							<th rowspan="1" colspan="1" width="">操作人</th>
              <th rowspan="1" colspan="1" width="">生成时间</th>
							<th rowspan="1" colspan="1" width="">缺药数量</th>
            </tr>
          </thead>
          {{#if reportList}}
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
            {{#each reportList as |report|}}
						<tr {{action "toDetailPage" report on="click"}}>
							<td class="ellipsis">{{report.createUser.name}}</td>
							<td class="ellipsis">{{report.createDateTimeStr}}</td>
							<td class="ellipsis">{{report.lackNum}}</td>
						</tr>
            {{/each}}
          </tbody>
          {{else}}
          {{/if}}
        </table>
        {{#if reportList }}
            {{page-numbers content=reportList showFL=true numPagesToShow=5}}
            {{else}}
                <h1 class="col-sm-12 center unTask"></h1>
        {{/if}}
      </div>
				<!-- 列表详细介绍 -->
		</div>
		<!-- /BOX-BODY -->
	</div>
</div>

{{#if lookDrugModel}}
{{#bs-modal body=false footer=false header=false closedAction="invitation"}}
  {{#bs-modal-header}}
    <h3 class="modal-title">药品统计</h3>
  {{/bs-modal-header}}
  {{#bs-modal-body}}
  <div class="">
    <div class="box" style="max-height:500px;overflow-y:auto;padding:15px 10px;">
      <div class="box-body" id='look-drug'>
      <div name="printbegin">
	      <div class="col-sm-12 nopadding-left" style="margin-bottom:10px;">
	        <span style="font-size:16px;color:#8D8DA9;">操作人：</span>
	        <span style="font-size:14px;color:#8D8D8D">{{curReport.createUser.name}}</span>
					&nbsp;&nbsp;&nbsp;
	        <span style="font-size:16px;color:#8D8DA9;">生成时间：</span>
	        <span style="font-size:14px;color:#8D8D8D">{{curReport.createDateTimeStr}}</span>
					&nbsp;&nbsp;&nbsp;
	        <span style="font-size:16px;color:#8D8DA9;">缺药数量：</span>
	        <span style="font-size:14px;color:#8D8D8D">{{curReport.lackNum}}</span>
	      </div>
	      {{#if itemList}}
	      <div id="datatable2_wrapper" class="dataTables_wrapper form-inline look-drug-list" role="grid">
	        <table id="datatable2" cellpadding="0" cellspacing="0" border="0" class="center datatable table table-bordered dataTable" aria-describedby="datatable1_info">
	            <thead>
                <tr role="row" >
									<th rowspan="1" colspan="1" width="">老人姓名</th>
		              <th rowspan="1" colspan="1" width="">身份证号码</th>
									<th rowspan="1" colspan="1" width="">药品名称</th>
									<th rowspan="1" colspan="1" width="">生产厂家</th>
		              <th rowspan="1" colspan="1" width="">当前数量</th>
		              <th rowspan="1" colspan="1" width="">可用天数</th>
                </tr>
	            </thead>
	            <tbody>
                {{#each itemList as |item|}}
                  <tr>
										<td class="ellipsis">{{item.customerName}}</td>
										<td class="ellipsis">{{item.cardCode}}</td>
										<td class="ellipsis">{{item.drugName}}</td>
										<td class="ellipsis">{{item.drugFactory}}</td>
										<td class="ellipsis">{{item.currDrugNum}}</td>
										<td class="ellipsis">{{item.leftDays}}</td>
                  </tr>
                {{/each}}
	            </tbody>
	        </table>
	        </div>
	        {{else}}
	        {{/if}}
        </div>
      </div>
    </div>
    <!-- /BOX -->
  </div>
  {{/bs-modal-body}}
  {{#bs-modal-footer class="user-add-btn"}}
    {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-print"  text='打印' clickAction="printImg" printImg="printImg"}}
    {{/ui/mix-button}}
    {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='返回' clickAction="invitation" invitation="invitation"}}
    {{/ui/mix-button}}
  {{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}


{{#if showModify}}
	{{#bs-modal body=false footer=false header=false closeAction='close'}}
		{{#bs-modal-header}}
			<h3 class="modal-title">修改提示</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
			<h4 class="modal-title center">
				当前药品提醒天数为{{input type="text" class="inline-block form-input-group label-normal form-control width32 padding-3-5 margin-0-3px center" value=curDrugConf.value}}天
			</h4>
		{{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-check"  text='确定' clickAction="saveConf" saveConf="saveConf" }}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="close" close="close"}}
      {{/ui/mix-button}}
    {{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
